import 'package:flutter_test/flutter_test.dart';
import 'package:huy_kwa/huy_kwa.dart';
import 'package:huy_kwa/huy_kwa_platform_interface.dart';
import 'package:huy_kwa/huy_kwa_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockHuyKwaPlatform
    with MockPlatformInterfaceMixin
    implements HuyKwaPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final HuyKwaPlatform initialPlatform = HuyKwaPlatform.instance;

  test('$MethodChannelHuyKwa is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelHuyKwa>());
  });

  test('getPlatformVersion', () async {
    HuyKwa huyKwaPlugin = HuyKwa();
    MockHuyKwaPlatform fakePlatform = MockHuyKwaPlatform();
    HuyKwaPlatform.instance = fakePlatform;

    expect(await huyKwaPlugin.getPlatformVersion(), '42');
  });
}
